<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title></title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<link rel="stylesheet" type="text/css" href="css/styles.css">
	<link type="text/css" href="css/message.css" rel="stylesheet">
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/passWordModify.js"></script>
	<script type="text/javascript" src="js/validate.js"></script>
	<script type="text/javascript" src="js/message.js"></script>
	<script type="text/javascript" src="js/privModify.js"></script>
  </head>
  
  <body>
   <div align="left" style="color : #000000">院系管理</div>
   <hr color="#336699">
   	<table>
 		<tr>
 			<th>代码ID</th>
 			<th>代码名称</th>
 			<th>状态</th>
 		</tr>
 		<c:choose>
 			<c:when test="${empty collegeList}">
 			<tr >
 				<td colspan="3">
 			</td>
 			</tr>
 			</c:when>
 			<c:otherwise>
 			<c:forEach items="${collegeList}" var="college">
 			<tr onmouseover="this.className='mouseOver'" onmouseout="this.className='mouseOut'">
 				<td>${college.id}</td>
 				<td><input value="${college.name}" id="${college.id}" onchange="collegeModify(${college.id})"/></td>
 				<td><span id="state${college.id}">未修改</span></td>
 			</tr>
 			</c:forEach>
 			</c:otherwise>
 		</c:choose>
 		</table>
 		
 	<fieldset>
 		<legend>添加院系</legend>
 		<form action="collegeAddAction.action" name="collegeForm">
 			<label style="margin-left:10px">院系名称:</label>
 			<input type="text" name="collegeName" id="collegeName" style="margin-left:25px">
 			<input type="button" onclick="collegeAdd()" value="添加" style="height:20px;margin-left:15px">
 		</form>
 	</fieldset>
  </body>
</html>
